package com.dm.cosdemo;

import android.os.Bundle;

import io.flutter.embedding.android.FlutterActivity;
import io.flutter.embedding.engine.plugins.shim.ShimPluginRegistry;
import io.flutter.plugin.common.PluginRegistry;
import io.flutter.plugins.GeneratedPluginRegistrant;

public class MainActivity extends FlutterActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        ShimPluginRegistry shimPluginRegistry = new ShimPluginRegistry(getFlutterEngine());
        GeneratedPluginRegistrant.registerWith(getFlutterEngine());
        registerCustomPlugin(shimPluginRegistry);
    }

    private void registerCustomPlugin(PluginRegistry registrar) {
        CosUploadPlugin.registerWith(registrar.registrarFor(CosUploadPlugin.CHANNEL));
    }
}
